package com.logica.mdm.webservices.dataobject.mdm;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

import javax.xml.bind.annotation.XmlType;

import org.apache.commons.beanutils.PropertyUtils;

import com.siperian.sif.message.RecordKey;
import com.siperian.sif.message.mrm.CleansePutResponse;

/**
 * Typed CleansePutResponse object.
 * @author Fabien Crespel <fabien.crespel@logica.com>
 */
@XmlType(propOrder={ "message", "interactionId", "responseType", "recordKey", "actionType", "dependentSourceKey" })
public class CleansePutTypedResponse implements Serializable {
	private static final long serialVersionUID = 1L;

	private String message;
	private String interactionId;
	private String responseType;
	private RecordKey recordKey;
	private String actionType;
	private String dependentSourceKey;
	
	/**
	 * Default constructor.
	 */
	public CleansePutTypedResponse() {
	}
	
	/**
	 * Constructor using an existing CleansePutResponse to build the object.
	 * @param response existing CleansePutResponse
	 * @throws IllegalAccessException
	 * @throws InvocationTargetException
	 * @throws NoSuchMethodException
	 */
	public CleansePutTypedResponse(CleansePutResponse response) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
		PropertyUtils.copyProperties(this, response);
		this.setResponseType(response.getClass().getSimpleName());
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getInteractionId() {
		return interactionId;
	}

	public void setInteractionId(String interactionId) {
		this.interactionId = interactionId;
	}

	public String getResponseType() {
		return responseType;
	}

	public void setResponseType(String responseType) {
		this.responseType = responseType;
	}

	public String getActionType() {
		return actionType;
	}

	public void setActionType(String actionType) {
		this.actionType = actionType;
	}

	public RecordKey getRecordKey() {
		return recordKey;
	}

	public void setRecordKey(RecordKey recordKey) {
		this.recordKey = recordKey;
	}

	public String getDependentSourceKey() {
		return dependentSourceKey;
	}

	public void setDependentSourceKey(String dependentSourceKey) {
		this.dependentSourceKey = dependentSourceKey;
	}
}
